<!--
 * @Author: your name
 * @Date: 2020-06-12 17:43:13
 * @LastEditTime: 2020-06-15 14:21:17
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \codeSnippet\front\pages\login.vue
-->
<template>
  <div>
    <el-form>
      <el-form-item>
        <i class="el-icon-user"></i>
        <el-input placeholder="请输入账号"></el-input>
      </el-form-item>
      <el-form-item>
        <i class="el-icon-lock"></i>
        <el-input placeholder="请输入密码"></el-input>
      </el-form-item>
      <el-form-item>
        <el-input placeholder="请输入验证码"></el-input>
        <img @click="updateCaptcha" :src="captchaUrl" alt />
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  layout: 'login',
  data() {
    return {
      captchaUrl: '/api/captcha'
    };
  },
  mounted(){
    this.updateCaptcha()
  },
  methods: {
    updateCaptcha() {
      this.captchaUrl = '/api/captcha?_t=' + Date.now();
    }
  }
};
</script>
